package com.chixing.day17.ThreadTest;


public class AccounntTest {
    public static void main(String[] args) {
       Account account = new Account("smith",0);
       for(int i =0; i < 1000; i++) {
           BankThread thread = new BankThread(account);
           thread.start();
       }
        try {
            Thread.sleep(9000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("主线程休眠足够久的时间，保证1000个终端存款完成后，在获得余额：" + account.getAccPrice());
    }
}
